home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_actor_indymine.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  91 lines

  1. # Jones 3D Cog Script
  2. #
  3. # actor_IndyMine.cog
  4. #
  5. # [PDL]
  6. #
  7. # Indy's script while driving the mine car.
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ===================================================================
  12.  
  13. symbols
  14.  
  15.     message     damaged
  16.     message        boarded
  17.     message        user0
  18.     message        user1
  19.  
  20.     thing        indy                            local
  21.     int            damageType                        local
  22.     int            damage                            local 
  23.     sound        ricochet=gen_ricochet_mc.wav    local
  24.  
  25.     # Loaded for engines benefit
  26.     template    sparks=minecarsparks            local
  27.  
  28. end
  29.  
  30. # ===================================================================
  31.  
  32. code
  33.  
  34. user0:
  35.  
  36.     StartCutScene(2);
  37.     return;
  38.  
  39. # -------------------------------------------------------------------
  40.  
  41. user1:
  42.     EndCutScene();
  43.     return;
  44.  
  45. # -------------------------------------------------------------------
  46.  
  47. boarded:
  48.  
  49.     CopyPlayerHolsters(GetSourceRef(), GetSenderRef());
  50.  
  51.     return;
  52.  
  53. # -------------------------------------------------------------------
  54.  
  55. damaged:
  56.     damageType = GetParam(1);
  57.     indy = GetLocalPlayerThing();
  58.     damage = GetParam(0);
  59.  
  60.     if (BITTEST(damageType, 0x5)) // fire and impact only
  61.     {
  62.         if (IsCrouching(Indy))
  63.         {
  64.             damage = 0;
  65. //            PRINT("Missed Me - ducking");
  66.         }
  67.         else if (RandBetween(1,2) == 1)
  68.         {
  69.             damage = 0;
  70. //            PRINT("Missed Me - random");
  71.         }
  72.     }
  73.     else if (!BITTEST(damageType, 0x4000100)) // not bonk damage or poison
  74.     {
  75. //        PRINT("Can't hurt Me");
  76.         damage = 0;
  77.     }
  78.  
  79.     if (BITTEST(damageType, 0x1) && damage == 0)
  80.     {
  81.         // play richochet sound
  82. //        PRINT("ka-ching");
  83.         PlaySoundThing(ricochet, indy, 1.0, 0.0, 10.0, 0x880);
  84.     }
  85.  
  86.     ReturnEx(damage);
  87.     return;
  88.  
  89. end
  90.  
  91.